package objectFour;

import java.util.Arrays;

public class studentTest {
    public static void main(String[] args) {
        Student[] student=new Student[20];
        for (int i = 0; i < student.length; i++) {
            student[i]=new Student();
            student[i].number=i+1;
            student[i].state=(int)(Math.random()*6+1);
            student[i].score=(int)(Math.random()*101);
        }
        /*          打印指定年级的方法         */

        StudentUtil stuUtil=new StudentUtil();//引入公共的方法文件相当于JS的import
        stuUtil.printStudentsState(student,5);

        System.out.println("*****       未排序的学生成绩        *****");
        stuUtil.printlnStudents(student);
        /*          排序          */

        stuUtil.sortStudents(student);

        System.out.println("*****       排序后的学生成绩       *****");
        stuUtil.printlnStudents(student);

    }
}
